<?php if (!defined('THINK_PATH')) exit();?><script>
    $('#hospital_select').change(function() {
        $.ajax({
            url:"/index/data",
            type: "get",
            data: { do: "change",
                    hospital_select:$("#hospital_select").val(),
                     },
            dataType: "json",
        });
        location.reload('/index/data');
    });
</script>
<?php if($single == true): else: ?>
<div class="bjui-pageHeader" style="background:#FFF;">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h4>
                    选择医院
                    <select name="hospital_select" data-toggle="selectpicker" data-width="200"  id="hospital_select" >
                        <?php if(is_array($hospital_list)): $i = 0; $__LIST__ = $hospital_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" <?php if($hospital["id"] == $vo['id']): ?>selected<?php endif; ?>>
                            <?php echo ($vo["name"]); ?>
                        </option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                </h4>
            </div>
        </div>
    </div>
</div><?php endif; ?>
<div class="bjui-pageContent">
<div style="margin-top:5px; padding:0 5px; overflow:hidden;">
<div class="row">
<?php if(in_array(($depart_id), explode(',',"1,2,3,4"))): ?><div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">整体预约统计数据</h3>
            </div>
            <div class="panel-body">
                <table class="table  table-bordered table-striped table-hover" width="20%">
                    <tbody>
                        <tr>
                            <td>今日</td>
                            <td>预到 <?php echo ($t_all); ?></td>
                            <td>实到 <?php echo ($t_all_come); ?></td>
                            <td>未到 <?php echo ($t_all_not); ?></td>
                            <td>待跟 <?php echo ($t_all_z); ?></td>
                        </tr>
                        <tr>
                            <td>昨日</td>
                            <td>预到 <?php echo ($y_all); ?></td>
                            <td>实到 <?php echo ($y_all_come); ?></td>
                            <td>未到 <?php echo ($y_all_not); ?></td>
                            <td>待跟 <?php echo ($y_all_z); ?></td>
                        </tr>
                        <tr>
                            <td>同期</td>
                            <td>预到 <?php echo ($l_m_t_all); ?></td>
                            <td>实到 <?php echo ($l_m_t_all_come); ?></td>
                            <td>未到 <?php echo ($l_m_t_all_not); ?></td>
                            <td>待跟 <?php echo ($l_m_t_all_z); ?></td>
                        </tr>
                        <tr>
                            <td>本月</td>
                            <td>预到 <?php echo ($this_m_all); ?></td>
                            <td>实到 <?php echo ($this_m_all_come); ?></td>
                            <td>未到 <?php echo ($this_m_all_not); ?></td>
                            <td>待跟 <?php echo ($this_m_all_z); ?></td>
                        </tr>
                        <tr>
                            <td>上月</td>
                            <td>预到 <?php echo ($l_m_all); ?></td>
                            <td>实到 <?php echo ($l_m_all_come); ?></td>
                            <td>未到 <?php echo ($l_m_all_not); ?></td>
                            <td>待跟 <?php echo ($l_m_all_z); ?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div><?php endif; ?>
<?php if(in_array(($depart_id), explode(',',"1,2,3,4"))): ?><div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">网络预约统计数据</h3>
            </div>
            <div class="panel-body">
                <table class="table  table-bordered table-striped table-hover" width="20%">
                    <tbody>
                        <tr>
                            <td>今日</td>
                            <td>预到 <?php echo ($t_web); ?></td>
                            <td>实到 <?php echo ($t_web_come); ?></td>
                            <td>未到 <?php echo ($t_web_not); ?></td>
                            <td>待跟 <?php echo ($t_web_z); ?></td>
                        </tr>
                        <tr>
                            <td>昨日</td>
                            <td>预到 <?php echo ($y_web); ?></td>
                            <td>实到 <?php echo ($y_web_come); ?></td>
                            <td>未到 <?php echo ($y_web_not); ?></td>
                            <td>待跟 <?php echo ($y_web_z); ?></td>
                        </tr>
                        <tr>
                            <td>同期</td>
                            <td>预到 <?php echo ($l_m_t_web); ?></td>
                            <td>实到 <?php echo ($l_m_t_web_come); ?></td>
                            <td>未到 <?php echo ($l_m_t_web_not); ?></td>
                            <td>待跟 <?php echo ($l_m_t_web_z); ?></td>
                        </tr>
                        <tr>
                            <td>本月</td>
                            <td>预到 <?php echo ($this_m_web); ?></td>
                            <td>实到 <?php echo ($this_m_web_come); ?></td>
                            <td>未到 <?php echo ($this_m_web_not); ?></td>
                            <td>待跟 <?php echo ($this_m_web_z); ?></td>
                        </tr>
                        <tr>
                            <td>上月</td>
                            <td>预到 <?php echo ($l_m_web); ?></td>
                            <td>实到 <?php echo ($l_m_web_come); ?></td>
                            <td>未到 <?php echo ($l_m_web_not); ?></td>
                            <td>待跟 <?php echo ($l_m_web_z); ?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div><?php endif; ?>
<?php if(in_array(($depart_id), explode(',',"1,2,3,4,6"))): ?><div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">电话预约统计数据</h3>
            </div>
            <div class="panel-body">
                <table class="table  table-bordered table-striped table-hover" width="20%">
                    <tbody>
                        <tr>
                            <td>今日</td>
                            <td>预到 <?php echo ($t_tel); ?></td>
                            <td>实到 <?php echo ($t_tel_come); ?></td>
                            <td>未到 <?php echo ($t_tel_not); ?></td>
                            <td>待跟 <?php echo ($t_tel_z); ?></td>
                        </tr>
                        <tr>
                            <td>昨日</td>
                            <td>预到 <?php echo ($y_tel); ?></td>
                            <td>实到 <?php echo ($y_tel_come); ?></td>
                            <td>未到 <?php echo ($y_tel_not); ?></td>
                            <td>待跟 <?php echo ($y_tel_z); ?></td>
                        </tr>
                        <tr>
                            <td>同期</td>
                            <td>预到 <?php echo ($l_m_t_tel); ?></td>
                            <td>实到 <?php echo ($l_m_t_tel_come); ?></td>
                            <td>未到 <?php echo ($l_m_t_tel_not); ?></td>
                            <td>待跟 <?php echo ($l_m_t_tel_z); ?></td>
                        </tr>
                        <tr>
                            <td>本月</td>
                            <td>预到 <?php echo ($this_m_tel); ?></td>
                            <td>实到 <?php echo ($this_m_tel_come); ?></td>
                            <td>未到 <?php echo ($this_m_tel_not); ?></td>
                            <td>待跟 <?php echo ($this_m_tel_z); ?></td>
                        </tr>
                        <tr>
                            <td>上月</td>
                            <td>预到 <?php echo ($l_m_tel); ?></td>
                            <td>实到 <?php echo ($l_m_tel_come); ?></td>
                            <td>未到 <?php echo ($l_m_tel_not); ?></td>
                            <td>待跟 <?php echo ($l_m_tel_z); ?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div><?php endif; ?>

<?php if(in_array(($depart_id), explode(',',"1,2,4,5,7"))): if(is_array($dp)): $i = 0; $__LIST__ = $dp;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><?php echo ($vo["dp"]); ?>预约统计数据</h3>
            </div>
            <div class="panel-body">
                <table class="table  table-bordered table-striped table-hover" width="25%">
                    <tbody>
                        <tr>
                            <td>今日</td>
                            <td>预到 <?php echo ($vo["t_dp"]); ?></td>
                            <td>实到 <?php echo ($vo["t_dp_come"]); ?></td>
                            <td>未到 <?php echo ($vo["t_dp_not"]); ?></td>
                            <td>待跟 <?php echo ($vo["t_dp_z"]); ?></td>
                        </tr>
                        <tr>
                            <td>昨日</td>
                            <td>预到 <?php echo ($vo["y_dp"]); ?></td>
                            <td>实到 <?php echo ($vo["y_dp_come"]); ?></td>
                            <td>未到 <?php echo ($vo["y_dp_not"]); ?></td>
                            <td>待跟 <?php echo ($vo["y_dp_z"]); ?></td>
                        </tr>
                        <tr>
                            <td>同期</td>
                            <td>预到 <?php echo ($vo["l_m_t_dp"]); ?></td>
                            <td>实到 <?php echo ($vo["l_m_t_dp_come"]); ?></td>
                            <td>未到 <?php echo ($vo["l_m_t_dp_not"]); ?></td>
                            <td>待跟 <?php echo ($vo["l_m_t_dp_z"]); ?></td>
                        </tr>
                        <tr>
                            <td>本月</td>
                            <td>预到 <?php echo ($vo["this_m_dp"]); ?></td>
                            <td>实到 <?php echo ($vo["this_m_dp_come"]); ?></td>
                            <td>未到 <?php echo ($vo["this_m_dp_not"]); ?></td>
                            <td>待跟 <?php echo ($vo["this_m_dp_z"]); ?></td>
                        </tr>
                        <tr>
                            <td>上月</td>
                            <td>预到 <?php echo ($vo["l_m_dp"]); ?></td>
                            <td>实到 <?php echo ($vo["l_m_dp_come"]); ?></td>
                            <td>未到 <?php echo ($vo["l_m_dp_not"]); ?></td>
                            <td>待跟 <?php echo ($vo["l_m_dp_z"]); ?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div><?php endforeach; endif; else: echo "" ;endif; endif; ?>
<?php if(in_array(($depart_id), explode(',',"1,2,3,4,7"))): ?><div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">自挂预约统计数据</h3>
            </div>
            <div class="panel-body">
                <table class="table  table-bordered table-striped table-hover" width="25%">
                    <tbody>
                        <tr>
                            <td>今日</td>
                            <td>预到 <?php echo ($t_zg); ?></td>
                            <td>实到 <?php echo ($t_zg_come); ?></td>
                            <td>未到 <?php echo ($t_zg_not); ?></td>
                            <td>待跟 <?php echo ($t_zg_z); ?></td>
                        </tr>
                        <tr>
                            <td>昨日</td>
                            <td>预到 <?php echo ($y_zg); ?></td>
                            <td>实到 <?php echo ($y_zg_come); ?></td>
                            <td>未到 <?php echo ($y_zg_not); ?></td>
                            <td>待跟 <?php echo ($y_zg_z); ?></td>
                        </tr>
                        <tr>
                            <td>同期</td>
                            <td>预到 <?php echo ($l_m_t_zg); ?></td>
                            <td>实到 <?php echo ($l_m_t_zg_come); ?></td>
                            <td>未到 <?php echo ($l_m_t_zg_not); ?></td>
                            <td>待跟 <?php echo ($l_m_t_zg_z); ?></td>
                        </tr>
                        <tr>
                            <td>本月</td>
                            <td>预到 <?php echo ($this_m_zg); ?></td>
                            <td>实到 <?php echo ($this_m_zg_come); ?></td>
                            <td>未到 <?php echo ($this_m_zg_not); ?></td>
                            <td>待跟 <?php echo ($this_m_zg_z); ?></td>
                        </tr>
                        <tr>
                            <td>上月</td>
                            <td>预到 <?php echo ($l_m_zg); ?></td>
                            <td>实到 <?php echo ($l_m_zg_come); ?></td>
                            <td>未到 <?php echo ($l_m_zg_not); ?></td>
                            <td>待跟 <?php echo ($l_m_zg_z); ?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div><?php endif; ?>
</div>
</div>
</div>